<?php
    $rand_id="carouselSlides_".rand(1000000,9999999);
?>
<div id="<?=$rand_id ?>" class="carousel slide" data-bs-ride="carousel">
    <div class="carousel-indicators">
        <?php foreach($images as $k=>$img){ 
            $active = ($k===0) ? 'class="active" aria-current="true"':'';
        ?>
        <button type="button" data-bs-target="<?=$rand_id ?>" data-bs-slide-to="<?=$k ?>" <?=$active ?> aria-label="Slide <?=$rand_id ?>"></button>
        <?php } ?>
    </div>   
    <div class="carousel-inner">
        <?php foreach($images as $k=>$img){ 
            $active = ($k===0) ? 'active':'';
        ?>
        <div class="carousel-item <?=$active ?>">
            <img src="<?=laoha_thumb($img,600,400)?>" class="d-block w-100" alt="">
        </div>
        <?php } ?>
    </div>
    <button class="carousel-control-prev" type="button" data-bs-target="#<?=$rand_id ?>" data-bs-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Previous</span>
    </button>
    <button class="carousel-control-next" type="button" data-bs-target="#<?=$rand_id ?>" data-bs-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Next</span>
    </button>
</div>